import {
  getFinanceBillList,
  getFinanceRecord,
  getTransactionType,
  getTransactionTypeCount,
  getWithdrawalRecord,
  getWithdrawList,
  getMarkCollect,
  getWithdrawalType,
  operateWithdrawal,
  getWithdrawDetail,
  applyWithdraw,
  cancelWithdraw,
  initDetailForReject,
  getStatusMap,
} from '@/services/Withdrawal';

export default () => {

  // 获取平台收支列表
  const GetFinanceRecord = (params: any) => {
    return getFinanceRecord(params);
  };

  // 获取商家端收支列表
  const GetFinanceBillList = (params: any) => {
    return getFinanceBillList(params);
  };

  // 获取交易类型
  const GetTransactionType = (params: any) => {
    return getTransactionType(params);
  };

  // 获取平台提现明细
  const GetWithdrawalRecord = (params: any) => {
    return getWithdrawalRecord(params);
  };

  // 获取商家端提现明细
  const GetWithdrawList = (params: any) => {
    return getWithdrawList(params);
  };


  // 获取平台端财务tab数据
  const GetTransactionTypeCount = (params: any) => {
    return getTransactionTypeCount(params);
  };

  // 获取商家端财务tab数据
  const GetMarkCollect = (params: any) => {
    return getMarkCollect(params);
  };

  // 获取提现方式
  const GetWithdrawalType = (params: any) => {
    return getWithdrawalType(params);
  };

  // 审核提现
  const AuditWithdrawal = (params: any) => {
    return operateWithdrawal(params);
  };

  // 加载《预提现》详情接口
  const GetWithdrawDetail = (params: any) => {
    return getWithdrawDetail(params);
  };

  // 申请提现
  const ApplyWithdraw = (params: any) => {
    return applyWithdraw(params);
  };

  //  取消提现
  const CancelWithdraw = (params: any) => {
    return cancelWithdraw(params);
  };

  // 重新申请提现
  const InitDetailForReject = (params: any) => {
    return initDetailForReject(params);
  }

  // 订单状态列表
  const GetStatusMap = () => {
    return getStatusMap();
  }


  return {
    GetFinanceRecord,
    GetTransactionType,
    GetFinanceBillList,
    GetWithdrawalRecord,
    GetTransactionTypeCount,
    GetWithdrawList,
    GetMarkCollect,
    GetWithdrawalType,
    AuditWithdrawal,
    GetWithdrawDetail,
    ApplyWithdraw,
    CancelWithdraw,
    InitDetailForReject,
    GetStatusMap,
  };
};
